import React, { useState, useContext } from "react";

export const MyContext = React.createContext();

export const NumWrapper = (props) => {
    const [num, setNum] = useState(0);
    const { Provider } = MyContext;
    return (
        <Provider value={{ num, setNum }}>
            {props.children}
        </Provider>
    )
}